/*
 * UnboundedBlockingQueue.h
 *
 *  Created on: Jun 26, 2009
 *      Author: elkobir
 */

#ifndef UNBOUNDEDBLOCKINGQUEUE_H_
#define UNBOUNDEDBLOCKINGQUEUE_H_
#include <iostream>
#include <fstream>
#include <list>
#include <semaphore.h>
#include <string>
using namespace std;

class UnboundedBlockingQueue {


private:
	list<string>* _queue;
	pthread_mutex_t	_sync;
	pthread_mutex_t _emptyMutex;
	pthread_cond_t	_emptyCond;

public:
	UnboundedBlockingQueue();
	virtual ~UnboundedBlockingQueue();
	bool addElement(string msg);
	string removeElement();
	bool isEmpty();
};

#endif /* UNBOUNDEDBLOCKINGQUEUE_H_ */
